﻿$(document).ready(function () {
    $("#editSignature").click(function (e) {
        e.preventDefault();
        var signDiv = $("#Signature");
        var signTex = $("#editedSignatureText");
        var c = $(this);
        var image = c.find('img');
        if (c.hasClass("edit")) {
            image.attr('src', '../images/accept.png');
            signDiv.hide();
            signTex.text(signDiv.text());
            signTex.show();
            c.removeClass('edit');
        } else {
            image.attr('src', '../images/edit_icon.png');
            signDiv.show();
            signDiv.text(signTex.val());
            signTex.hide();
            c.addClass('edit');
            var params = "EditSignature|" + signTex.val();
            CallServer(params, "");
        }
    });
});